package joelwilson.lucene.dao;

import java.io.IOException;
import java.util.List;

import joelwilson.lucene.dto.GenericDTO;

import org.apache.lucene.IndexProvider;

import com.google.appengine.api.datastore.Key;

public interface GenericDAO {

	// PUT methods
	
	public String put(GenericDTO dto) throws IOException;
	
	public String put(GenericDTO dto, IndexProvider alternativeIndexProvider) throws IOException;
	
	public List<String> put(Iterable<? extends GenericDTO> dtos) throws IOException;
	
	public List<String> put(Iterable<? extends GenericDTO> dtos, IndexProvider alternativeIndexProvider) throws IOException;
	
	// LOAD methods
	
	
	
	// DELETE methods
	
	public void delete(Key key, IndexProvider alternativeIndexProvider) throws IOException;
	
	public void delete(Key key) throws IOException;
	
	public void delete(String keyString, IndexProvider alternativeIndexProvider) throws IOException;
	
	public void delete(String keyString) throws IOException;
	
}
